package cn.sanch.system.domain;

import java.util.ArrayList;
import java.util.List;

import cn.sanch.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * 实体类：
 */
@Data
public class Menu extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private String name;
    private String component;
    private String url;
    private String icon;
    private Integer index;
    private Long parentId;
    private String intro;
    private Boolean state;

    /**
     * 上级菜单的对象
     */
    private Menu parent;

    /**
     * 菜单子部门集合
     *
     * JsonInclude(JsonInclude.Include.NON_EMPTY) 菜单树最后一级没有数据就不显示
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<Menu>();

}
